package org.jeecg.config.filter;

import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.filter.Filter;
import ch.qos.logback.core.spi.FilterReply;

public class LogFilter extends Filter<ILoggingEvent> {

    @Override
    public FilterReply decide(ILoggingEvent event) {
        if (event.getMessage().contains("mapper")|| event.getMessage().contains("Generating") || event.getMessage().contains("Mapped") || event.getMessage().contains("Columns") || event.getMessage().contains("Row")) {
        //if (event.getMessage().contains("请求地址")|| event.getMessage().contains("HTTP METHOD") || event.getMessage().contains("CLASS_METHOD") || event.getMessage().contains("参数") || event.getMessage().contains("Preparing")|| event.getMessage().contains("Parameters")|| event.getMessage().contains("Total")) {
            return FilterReply.DENY;
        } else {
            return FilterReply.NEUTRAL;
        }
    }
}